{extend name="public:base"/}

{block name="title"}商品列表{/block}
{block name="style"}{/block}

{block name="main"}

<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header m-b-sm">
                    <h3 class="box-title">商品列表</h3>
                </div>
                <!--
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="/backend/addons/rf-merchants/config/index"> 配置管理</a></li>
                        <li><a href="/backend/addons/rf-merchants/config-cate/index"> 配置分类</a></li>
                        <li class="pull-right">
                            <a class="btn btn-primary btn-xs" href="/backend/addons/rf-wechat/rule/edit"><i
                                    class="fa fa-plus"></i> 创建</a>
                        </li>
                    </ul>
                </div>
                -->
                <div class="farPaddingJustV from-search">
                    <div class="col-sm-8">
                        <form method="get" action="">
            
                            <div class="col-sm-3">
                                <div class="form-row">
                                    <input type="text" class="form-control" name="goods_id"
                                           placeholder="ID" value="<?=input('goods_id')?input('goods_id'):''?>">
                                </div>
                            </div>

                            <div class="col-sm-3">
                                <div class="form-row">
                                    <input type="text" class="form-control" name="goods_name"
                                           placeholder="商品名称" value="<?=input('goods_name')?input('goods_name'):''?>">
                                </div>
                            </div>

                            <div class="col-sm-3">
                                <div class="form-row">
                                    <input type="text" class="form-control" name="figure_nu"
                                           placeholder="商品图号" value="<?=input('figure_nu')?input('figure_nu'):''?>">
                                </div>
                            </div>

                            <div class="col-sm-3">
                                <div class="form-row">
                                    <span class="input-group-btn">
                                        <button class="btn btn-white"><i class="fa fa-search"></i> 搜索</button>
                                    </span>
                                </div>
                            </div>


                        </form>
                    </div>
                </div>
                <div class="clearfix"></div>

                <div class="box-body table-responsive">
                    <!--
                    <div class="menu-buttons m-b-sm">
                        <a href="<?=url('admin/Goods/create')?>" class="btn btn-sm btn-primary"><i class="fa fa-plus" ></i> 新增商品</a>
                    </div>
                    -->

                    <table id="table-index" class="table table-hover"><thead>
                    <tr>
                        <th style="width: 4%;">选择</th>
                        <th style="width: 10%;">ID</th>
                        <th style="width: 10%;">商品名称</th>
               
                        <th style="width: 10%;">商品图号</th>

                        <th style="width: 10%;">本店售价</th>
                    
                        <th style="width: 10%;">总库存</th>
          
                        <th style="width: 10%;">商品缩略图</th>

                        <th style="width: 10%;">是否上架</th>

                    </tr>

                    </thead>
                        <tbody>

 <?php if(!empty($dataProvider)){foreach($dataProvider as $k=>$v): ?>
                        <tr>
                            <td><input type="radio" class="select_goods_id" name="select_goods_id" value=<?=$v['goods_id']?> data-goods=<?=json_encode($v)?>></td>

                            <td><?=$v['goods_id']?></td>
            
                            <td>
                                <span class="m-l-sm"><?=$v['goods_name']?></span>
                            </td>
                                
                            <td>
                                <span class="m-l-sm"><?=$v['figure_nu']?></span>
                            </td>

                            <td>
                                <span class="m-l-sm"><?=$v['shop_price']?></span>
                            </td>
                                            
                            <td>
                                <span class="m-l-sm"><?=$v['store_count']?></span>
                            </td>
                    
                            <td>
                                <span class="m-l-sm"><?=showImage($v['original_img'])?></span>
                            </td>
                                                                    
                            <td>
                                <span class="m-l-sm"><?=$v['is_on_sale']?></span>
                            </td>
                        </tr>

  <?php endforeach; } ?>
                        </tbody>
                    </table>

                    <div class="m-t-md"></div>
                    <ul class="pagination">

                        <?=$dataProvider->render()?>
                    </ul>
                </div>

            </div>
        </div>
</section>
{/block}

{block name="js"}
{/block}


